package mystatic.src.LT.Book;

public class Book {
    private String title;
    private String author;
    private int pages;
    private String type;
    private boolean isBorrowed;

    public Book( String title,String author, int pages, String type) {
        this.author = author;
        this.pages = pages;
        this.title = title;
        this.type = type;
    }

    @Override
    public String toString() {
        return "Book{" +
                "书名：'" + title + '\'' +
                ", 作者：'" + author + '\'' +
                ", 页数:" + pages +
                ", 类型:'" + type + '\'' +
                ", 是否借出:" + (isBorrowed?"已借阅":"未借阅") +
                '}';
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public boolean isBorrowed() {
        return isBorrowed;
    }

    public void setBorrowed(boolean borrowed) {
        isBorrowed = borrowed;
    }

    public int getPages() {
        return pages;
    }

    public void setPages(int pages) {
        this.pages = pages;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }
}
